package com.huawei;

import java.util.Scanner;



public class HJ046 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        int n = scanner.nextInt();
        //偷懒就偷懒，应该不会出这种题，对于java来说
        //调用api没啥意思
        System.out.println(input.substring(0, n));
    }
}
